<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" lang="zh-CN" >
<head th:replace="/admin/_layout :: head(~{::title})">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>博客后台</title>
    <link rel="shortcut icon" href="../../../static/lib/img/k.ico" th:href="@{/lib/img/k.ico}" type="image/x-icon}">
    <link rel="stylesheet" href="../../../static/components/bootstrap/css/bootstrap.min.css" th:href="@{/components/bootstrap/css/bootstrap.min.css}">
    <link rel="stylesheet" href="../../../static/components/bootstrap/css/bootstrap-datepicker3.min.css" th:href="@{/components/bootstrap/css/bootstrap-datepicker3.min.css}">
    <link rel="stylesheet" href="../../../static/components/bootstrap/css/bootstrap-datetimepicker.min.css" th:href="@{/components/bootstrap/css/bootstrap-datetimepicker.min.css}">
    <link rel="stylesheet" href="../../../static/components/font-awesome/css/font-awesome.min.css" th:href="@{/components/font-awesome/css/font-awesome.min.css}">
    <link rel="stylesheet" href="../../../static/components/ionicons/css/ionicons.min.css" th:href="@{/components/ionicons/css/ionicons.min.css}">
    <link rel="stylesheet" href="../../../static/components/switchery/switchery.min.css" th:href="@{/components/switchery/switchery.min.css}">
    <link rel="stylesheet" href="../../../static/components/toastr/toastr.min.css" th:href="@{/components/toastr/toastr.min.css}">
    <link rel="stylesheet" href="../../../static/adminlte/css/AdminLTE.min.css" th:href="@{/adminlte/css/AdminLTE.min.css}">
    <link rel="stylesheet" href="../../../static/adminlte/css/skins/skin-blue.min.css" th:href="@{/adminlte/css/skins/skin-blue.min.css}">
    <link rel="stylesheet" href="../../../static/admin/css/admin.css" th:href="@{/admin/css/admin.css}">
    <!--[if lt IE 9]>
    <script src="../../../static/components/html5shiv/html5shiv.min.js" th:href="@{/components/html5shiv/html5shiv.min.js}"></script>
    <script src="../../../static/components/respond/respond.min.js" th:href="@{/components/respond/respond.min.js}"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <!-- Admin_Header_Start -->
    <header class="main-header"  th:replace="/admin/_layout ::Admin_Header">
        <!-- Logo -->
        <a href="/" target="_blank" class="logo">
            <span class="logo-mini"><b>NTU</b></span>
            <span class="logo-lg"><b>yyl</b></span>
        </a>
        <nav class="navbar navbar-static-top">
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">切换</span>
            </a>
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="/Jpress/static/commons/img/avatar.png" class="user-image">
                            <span class="hidden-xs">您好 aaa , 欢迎回来</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="user-header">
                                <img src="/Jpress/static/commons/img/avatar.png" class="img-circle">
                                <p>
                                    aaa
                                    <small>2020-11-04 18:36</small>
                                </p>
                            </li>
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="/Jpress/admin/user/me" class="btn btn-default btn-flat">我的资料</a>
                                </div>
                                <div class="pull-left" style="padding-left: 5px">
                                    <a href="/Jpress/ucenter/index" class="btn btn-default btn-flat" target="_blank">用户中心</a>
                                </div>
                                <div class="pull-right">
                                    <a href="/logout.do" class="btn btn-default btn-flat">退出</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- Admin_Header_End -->

    <!-- Admin_Left_menu_Start -->
    <aside class="main-sidebar" th:replace="/admin/_layout ::Admin_Left_menu">
        <!-- 表明所处页面 -->
        <script type="text/javascript">
            var jpress = {cpath:''}
        </script>
        <section class="sidebar" >
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree" id="sidebar-menu">
                <li class="block"></li>
                <li class="link">
                    <a href="<%= HomePath %>dashboard.html"><i class="fa fa-dashboard"></i> <span>面板</span></a>
                </li>

                <li class="block"></li>
                <li class="treeview">
                    <a href="#"><i class="fa fa-fw fa-file-text"></i> <span>文章</span>
                        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<%= HomePath %>article" target="">文章管理</a></li>
                        <li><a href="<%= HomePath %>article/write.html" target="">写文章</a></li>
                        <li><a href="<%= HomePath %>article/category.html" target="">分类</a></li>
                        <li><a href="<%= HomePath %>article/tag.html" target="">标签</a></li>
                        <li><a href="<%= HomePath %>article/comment.html" target="">评论</a></li>
                        <li><a href="<%= HomePath %>article/setting.html" target="">设置</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#"><i class="fa fa-fw fa-file"></i> <span>页面</span>
                        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="page" target="">页面管理</a></li>
                        <li><a href="page/write.html" target="">新建</a></li>
                        <li><a href="page/comment.html" target="">评论</a></li>
                        <li><a href="page/setting.html" target="">设置</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#"><i class="fa fa-fw fa-folder-open"></i> <span>附件</span>
                        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<%= HomePath %>attachment" target="">所有附件</a></li>
                        <li><a href="<%= HomePath %>attachment/upload.html" target="">上传</a></li>
                        <li><a href="<%= HomePath %>attachment/setting.html" target="">设置</a></li>
                        <li><a href="<%= HomePath %>attachment/root.html" target="">根目录</a></li>
                    </ul>
                </li>
                <li class="header">基础</li>

                <li class="treeview">
                    <a href="#"><i class="fa fa-fw fa-user"></i> <span>用户</span>
                        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<%= HomePath %>user" target="">用户管理</a></li>
                        <li><a href="<%= HomePath %>user/tag.html" target="">用户标签</a></li>
                        <li><a href="<%= HomePath %>user/mgroup.html" target="">会员组</a></li>
                        <li><a href="<%= HomePath %>user/sendMsg.html" target="">发消息</a></li>
                        <li><a href="<%= HomePath %>user/me.html" target="">我的资料</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#"><i class="fa fa-magic"></i> <span>模板</span>
                        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<%= HomePath %>template/menu.html" target="">菜单</a></li>
                        <li><a href="<%= HomePath %>template/setting.html" target="">设置</a></li>
                        <li><a href="<%= HomePath %>template/edit.html" target="">编辑</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#"><i class="fa fa-cog"></i> <span>系统</span>
                        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<%= HomePath %>system" target="">常规</a></li>
                        <li><a href="<%= HomePath %>system/reg.html" target="">登录注册</a></li>
                    </ul>
                </li>
            </ul>
        </section>
    </aside>
    <!-- Admin_Left_menu_End -->

    <!--Form -->
    <div class="content-wrapper" >

        <section class="content-header">
            <h1>
                写文章
            </h1>
        </section>

        <section class="content">
            <form action="/Jpress/admin/article/doWriteSave" method="post" id="form">
                <input type="hidden" id="articleStatus" name="article.status" value="normal">
                <input type="hidden" id="articleId" name="article.id" value="">
                <input type="hidden" name="article.user_id" value="1">
                <input type="hidden" id="editModeId" name="article.edit_mode" value="html">
                <div class="row">
                    <div class="col-lg-9">

                        <!-- /.box-header -->
                        <!-- form start -->
                        <div class="form-horizontal">
                            <div class="form-group">
                                <div class="col-sm-12">
                                    <input type="input" class="form-control input-lg" name="article.title" placeholder="请输入标题" id="article-title" value="">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-12" style="padding-bottom: 2px">
                                    网址：<span class="domainSpan">http://localhost:8080</span>/Jpress/article/<span id="slug" class="slugSpan editable editable-click editable-empty" for-input="article-slug">点击可编辑</span>
                                    <input type="hidden" id="article-slug" name="article.slug" value="">
                                    <a href="javascript:;" style="float: right;padding: 5px 0" onclick="doChangeEditor('0')">
                                        使用 markdown 编辑
                                    </a>
                                </div>
                                <div class="col-sm-12" style="z-index: 9999;">
                                    <textarea id="editor1" name="article.content" style="height: 467px; width: 100%; background-color: white;"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-12">
                                    <div class="box box-solid">
                                        <div class="box-header with-border">
                                            <h3 class="box-title">属性设置</h3>

                                            <div class="box-tools">
                                                <button type="button" class="btn btn-box-tool" data-widget="collapse">
                                                    <i class="fa fa-minus"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <!-- /.box-header -->
                                        <div class="box-body ">
                                            <div class="box-body ">

                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">文章摘要</label>
                                                    <div class="col-sm-6">
                                                        <textarea class="form-control" id="summary" name="article.summary" placeholder="请输入" rows="4"></textarea>
                                                        <p class="help-block"></p>
                                                    </div>
                                                </div><div class="form-group">
                                                <label class="col-sm-2 control-label">SEO关键字</label>
                                                <div class="col-sm-6">
                                                    <textarea class="form-control" id="meta_keywords" name="article.meta_keywords" placeholder="请输入" rows="2"></textarea>
                                                    <p class="help-block"></p>
                                                </div>
                                            </div><div class="form-group">
                                                <label class="col-sm-2 control-label">SEO描述</label>
                                                <div class="col-sm-6">
                                                    <textarea class="form-control" id="meta_description" name="article.meta_description" placeholder="请输入" rows="2"></textarea>
                                                    <p class="help-block"></p>
                                                </div>
                                            </div><div class="form-group">
                                                <label class="col-sm-2 control-label">排序序号</label>
                                                <div class="col-sm-6">
                                                    <input type="text" class="form-control" id="order_number" name="article.order_number" placeholder="请输入" value="">
                                                    <p class="help-block">文章列表会根据这个数值进行排序，越大越靠前。</p>
                                                </div>
                                            </div><div class="form-group">
                                                <label class="col-sm-2 control-label">外链</label>
                                                <div class="col-sm-6">
                                                    <input type="text" class="form-control" id="link_to" name="article.link_to" placeholder="请输入" value="">
                                                    <p class="help-block">填写外链后，浏览文章将会跳转到此链接。</p>
                                                </div>
                                            </div><div class="form-group">
                                                <label class="col-sm-2 control-label">发布时间</label>
                                                <div class="col-sm-6">
                                                    <input type="text" class="form-control datetimepicker" id="created" name="article.created" placeholder="请输入" value="">
                                                    <p class="help-block"></p>
                                                </div>
                                            </div><div class="form-group">
                                                <label class="col-sm-2 control-label">允许评论</label>
                                                <div class="col-sm-6">
                                                    <input type="checkbox" class="switchery" data-for="comment_status" checked>
                                                    <input type="hidden" id="comment_status" name="article.comment_status">
                                                </div>
                                            </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="col-lg-3">
                        <div class="box box-solid">
                            <div class="box-body ">
                                <button type="button" data-status="normal" class="btn btn-primary btn-sm submitBtn">发布
                                </button>
                                <button type="button" data-status="draft" class="btn btn-default btn-sm submitBtn">草稿
                                </button>
                                <a href="#" data-status="trash" class="pull-right submitBtn" style="padding-top: 5px;">移至垃圾箱</a>
                            </div>
                        </div>
                        <div class="box box-solid">
                            <div class="box-header with-border ">
                                <h3 class="box-title">分类</h3>
                            </div>
                            <div class="box-body ">
                                <div class="form-group">
                                    <div class="radio" th:each="ArticleCategory:${categories}">
                                        <label>
                                            <input type="radio" name="category" value="0" th:value="${ArticleCategory.id}">
                                            [[${ArticleCategory.title}]]
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box box-solid">
                            <div class="box-header with-border ">
                                <h3 class="box-title">标签</h3>
                            </div>
                            <div class="box-body">
                                <select class="form-control article-tags selectized" multiple="multiple" name="tag" tabindex="-1" style="display: none;"></select>
                                <div class="selectize-control form-control article-tags multi plugin-remove_button">
                                    <div class="selectize-input items not-full">
                                        <input type="select-multiple" autocomplete="off"></input>
                                    </div>
                                    <div class="selectize-dropdown multi form-control article-tags plugin-remove_button" style="display: none;">
                                        <div class="selectize-dropdown-content"></div>
                                    </div>
                                </div>
                                <p class="help-block">多个标签请用 “回车键” 或英文逗号（,）隔开。</p>

                                <div class="tags">
                                    <a href="javascript:;" th:each="ArticleCategory:${tags}" class="newTag">[[${ArticleCategory.title}]] ,</a>
                                </div>
                            </div>
                        </div>
                        <div class="box box-solid">
                            <div class="box-header with-border ">
                                <h3 class="box-title">缩略图</h3>
                            </div>
                            <div class="box-body no-padding">
                                <img src="/Jpress/static/commons/img/nothumbnail.jpg" style="width: 100%;height: 200px" id="thumbnail">
                                <input type="hidden" value="" name="article.thumbnail" id="articleThumbnail">
                            </div>
                            <div class="box-footer">
                                <button type="button" class="btn-image-browser btn btn-default btn-sm " for-src="thumbnail" for-input="articleThumbnail">选择图片
                                </button>
                                <a href="javascript:;" style="padding-left: 15px" id="removeThumbnail">移除</a>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </section>
    </div>
    <!-- ./Form-->

    <!--Footer-->
    <footer  class="main-footer" th:replace="/admin/_layout ::footer">
        <div class="pull-right hidden-xs">
            version v3.2.5
        </div>
        Copyright &copy; 2016-2020 <a href="http://www.jpress.io" target="_blank">JPress Studio</a>. All rights
        reserved.
    </footer>
    <!-- ./Footer-->

</div>
<!-- scripts -->
<th:block th:fragment="scripts" th:replace="/admin/_layout ::scripts">
    <script src="../../../static/components/jquery/jquery.min.js" th:src="@{/components/jquery/jquery.min.js}"></script>
    <script src="../../../static/components/jquery/jquery.form.min.js" th:src="@{/components/jquery/jquery.form.min.js}"></script>
    <script src="../../../static/components/bootstrap/js/bootstrap.js" th:src="@{/components/bootstrap/js/bootstrap.js}"></script>
    <script src="../../../static/components/bootstrap/js/bootstrap-datepicker.min.js" th:src="@{/components/bootstrap/js/bootstrap-datepicker.min.js}"></script>
    <script src="../../../static/components/bootstrap/js/bootstrap-datepicker.zh-CN.min.js" th:src="@{/components/bootstrap/js/bootstrap-datepicker.zh-CN.min.js}"></script>
    <script src="../../../static/components/moment/moment.min.js" th:src="@{/components/moment/moment.min.js}"></script>
    <script src="../../../static/admin/js/zh-cn.js" th:src="@{/admin/js/zh-cn.js}"></script>
    <script src="../../../static/components/bootstrap/js/bootstrap-datetimepicker.min.js" th:src="@{/components/bootstrap/js/bootstrap-datetimepicker.min.js}"></script>
    <script src="../../../static/components/fastclick/fastclick.js" th:src="@{/components/fastclick/fastclick.js}"></script>
    <script src="../../../static/components/layer/layer.js" th:src="@{/components/layer/layer.js}"></script>
    <script src="../../../static/components/switchery/switchery.min.js" th:src="@{/components/switchery/switchery.min.js}"></script>
    <script src="../../../static/components/toastr/toastr.min.js" th:src="@{/components/toastr/toastr.min.js}"></script>
    <script src="../../../static/adminlte/js/adminlte.min.js" th:src="@{/adminlte/js/adminlte.min.js}"></script>
    <script src="../../../static/admin/js/admin.js" th:src="@{/admin/js/admin.js}"></script>
    <script src="../../../static/commons/commons.js" th:src="@{/commons/commons.js}"></script>
    <script src="../../../static/admin/js/csrf.js" th:src="@{/admin/js/csrf.js}"></script>
    <script>
        var date = getPara("date");
        if ("today" == date) {
            $("#group-today").addClass("active");
        } else if ("yesterday" == date) {
            $("#group-yesterday").addClass("active");
        } else if ("7d" == date) {
            $("#group-7d").addClass("active");
        } else if ("14d" == date) {
            $("#group-14d").addClass("active");
        } else if ("28d" == date) {
            $("#group-28d").addClass("active");
        } else {
            $("#group-today").addClass("active");
        }
    </script>
</th:block>
<!-- ./scripts -->
</body>
</html>
